﻿using System;
using System.Linq;

using Fuse8.DomainFramework.Common;
using Fuse8.DomainFramework.Domain;

using Fuse8.ContentManagementFramework.Domain.Special;
using Fuse8.ContentManagementFramework.Domain.Commands.CommandParameters;

namespace Fuse8.ContentManagementFramework.Domain.Commands
{
    public abstract class CmsUserInformationForManagementCommand : BaseEntityParameterCommand<CmsUserInformation, CmsUserInformationForManagementCommandParameter>
    {
        #region IEntityCommand<CmsUserInformation> Members

        public override string CacheKey
        {
            get
            {
                return string.Format("Id_{0};CurrentPage_{1};PageCapacity_{2};SiteGroup_{3};Site_{4};SF_{5};SD_{6}",
                    CommandParameter.Id,
                    CommandParameter.CurrentPage,
                    CommandParameter.PageCapacity,
                    CommandParameter.SiteGroupId.GetValueOrDefault(0),
                    CommandParameter.SiteId.GetValueOrDefault(0),
                    CommandParameter.SortField,
                    CommandParameter.SortDirection);
            }
        }

        public override string CommandName
        {
            get
            {
                return "CmsUserInformationForManagementCommand";
            }
        }

        #endregion
    }
}
